<?php
	namespace Home\Model;
	use Think\Model;
	class CateModel extends Model {
		/**
		 * 获取文章分类
		 */
		public function getCurrentSon() {			
			return $this->field('id,cate_name')->where('cate_delete=0')->select();
		}
		
		/**
		 * 根据id获取该分类的名称和描述
		 */
		public function getCateName($id) {
			return $this->field('id,cate_name,cate_desc')->where('cate_delete=0')->find($id);
		}
	}
